﻿using ByteSite.Common;
using ByteSite.Quartz;
using JinianNet.JNTemplate;
using Microsoft.Extensions.DependencyInjection;
using Quartz;
using Quartz.Impl.Matchers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Yitter.IdGenerator;

namespace ByteSite.Web
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Response.Write(YitIdHelper.NextId());


            //JinianNet.JNTemplate.ITemplate template = Engine.CreateTemplate("<p>你好，$name</p>");
            //template.Set("name", "jntemplate");
            //string html = template.Render();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            //string strGoodsListJson = QLYCCatch.GetHtml("http://ggzyjyzx.shandong.gov.cn/wssc/mc_goods/543_0?from=null&page=1&rows=16&pages=70");

            //try
            //{
            //    if (!string.IsNullOrEmpty(strGoodsListJson))
            //    {
            //        Entitys.QLYCGoodsList.Root thisPageData = JsonHelper2.JSONToObject<Entitys.QLYCGoodsList.Root>(strGoodsListJson);
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Response.Clear();
            //    Response.Write(ex);
            //    Response.End();
            //}

            //商品详情数据
            //{"id":1043691,"createdAt":"2021-03-02 14:21:24","updatedAt":"2021-03-16 15:21:04","sn":null,"name":"齐心（COMIX）晶纯高速王打印 A4复印纸 C4784 A4 80g 500张/包 单包","price":0.42000,"marketPrice":0.44000,"cost":null,"coverUrl":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/75c459af0dc37bc20b6fc1e4230ec1dc.jpg!w250","coverName":null,"unit":null,"weight":0.0,"stock":null,"catalogId":145,"brandId":2839,"mallBrandName":null,"param":"<table><tr><td>品牌</td><td>OLOEY</td></tr><tr><td>类型</td><td>复印纸</td></tr><tr><td>包装</td><td>500张/包</td></tr></table>","ware":null,"productArea":null,"upc":null,"model":"C4784","userId":null,"supplierId":30675,"sales":null,"hits":186,"isMarketable":null,"monthSales":null,"monthSalesIndex":null,"isDelete":0,"sku":"258725","protocolId":null,"brandName":"Comix/齐心","catalogName":"复印纸","supplierName":"潍坊惠科瑞智电子科技有限公司","status":3,"protocolName":"2020年德州市第四季度征集供应商入驻2020年网上商城超市电商德州市协议","manufacturerIdent":null,"afterSaleService":"售后服务由潍坊惠科瑞智电子科技有限公司提供！","detail":"<p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p><img src='https://resource.donvv.com/1/GoodsPhoto/2020/1/14/93bfee539f6f2675d0d4f74d69b9f82a.jpg'/></p><p><img src='https://resource.donvv.com/1/GoodsPhoto/2020/1/14/f1fb16bfad475c3be40e660d8c3c1517.jpg'/></p><p><img src='https://resource.donvv.com/1/GoodsPhoto/2020/1/14/ba9706255b65eb3e5aed863b0bb035df.jpg'/></p><p><img src='https://resource.donvv.com/1/GoodsPhoto/2020/1/14/7f5b3f5dae8414cd30d7462f0a455420.jpg'/></p><p><img src='https://resource.donvv.com/1/GoodsPhoto/2020/1/14/d2c49c3d3d4324a070acd17675464347.jpg'/></p><p><img src='https://resource.donvv.com/1/GoodsPhoto/2020/1/14/c20591fef010e6c745341cf188959c26.jpg'/></p><p><img src='https://resource.donvv.com/1/GoodsPhoto/2020/1/14/0d0b359574291995d61c966be0f71ca4.jpg'/></p><p><img src='https://resource.donvv.com/1/GoodsPhoto/2020/1/14/f6ab4107290ec417d84f6b2fa0971d05.jpg'/></p>","supplierProtocolId":null,"govCatalogId":2775,"factoryURL":"http://www.wfhkbg.com/Goods/Detail2/258725","description":null,"isCompleteMachine":null,"guaranteePeriod":null,"commoditiesId":null,"isEnergySaving":null,"isBatch":null,"carType":null,"energySaveCertNo":null,"energySaveCertAnnex":null,"energySaveCertValidity":null,"eccNumber":null,"eccAnnex":null,"eccValidity":null,"productAreaType":null,"color":null,"series":null,"benefitRate":null,"brand":{"id":2839,"createdAt":"2018-12-19 22:32:49","updatedAt":"2020-09-22 17:41:15","name":"Comix/齐心","logo":null,"url":null,"pinyin":"C","priority":null,"isDelete":0,"isFrozen":0,"shortName":null,"mappingName":"齐心(COMIX)|齐心|COMIX|齐心（COMIX）|Comix|Comix/齐心|齐心(COMIX)|齐心(Comix)|齐心/COMIX|齐心/Comix","standBrandId":1098,"standBrands":null,"firstUpperCasePinyin":"C"},"platformCatalogs":{"id":145,"createdAt":"2018-11-15 20:38:37","updatedAt":"2021-01-22 22:38:17","name":"复印纸","parentId":15,"treeDepth":4,"descs":null,"usable":0,"treeIds":"1_204_15","treeNames":"货物_办公用品_办公耗材","pic":null,"priority":18.0,"isParent":"false","code":"A0405","types":"collection,multiBrand","normalPrice":null,"mallCatalogId":21,"parent":null,"catalog":null,"children":null,"platformCatalogSites":null,"siteIdSet":null,"platformCatalogSite":null,"siteId":null,"catalogId":2775,"transactionForm":"直购","systems":"mall-direct","isDelete":0,"productFlag":0,"isPriceMonitor":true,"isMarketableMonitor":true,"isKeyMonitor":false,"isUnifiedParameter":false,"isMarketableUnifiedParameter":false,"priceRange":"[{\"startPrice\":0,\"endPrice\":100},{\"startPrice\":100,\"endPrice\":200},{\"startPrice\":200,\"endPrice\":300},{\"startPrice\":300,\"endPrice\":400},{\"startPrice\":400,\"endPrice\":null}]","spkXhgz":"201073-9498-10262-11615-10264","year":null,"firstSet":false,"innovative":false,"agentNum":null,"register":true,"buildingMaterial":false},"protocol":{"id":138,"protocolAreaList":null,"isTender":0,"regiserManagerId":24,"belongSiteId":8,"belongSiteName":null,"name":"2020年德州市第四季度征集供应商入驻2020年网上商城超市电商德州市协议","code":"20201020001","types":1,"sales":1,"stint":3,"startTime":"2010-10-09","endTime":"2030-10-09","createdAt":"2020-10-20 00:15:01","updatedAt":"2020-10-20 00:15:01","isDelete":0,"supplierProtocols":null,"supplierProtocolId":null,"isAssign":null,"status":2,"catalogsParts":null,"protocolSites":null,"siteIdSet":null},"pics":[{"id":25403255,"createdAt":"2021-03-02 14:21:30","updatedAt":"2021-03-02 14:21:30","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/75c459af0dc37bc20b6fc1e4230ec1dc.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/75c459af0dc37bc20b6fc1e4230ec1dc.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/75c459af0dc37bc20b6fc1e4230ec1dc.jpg","thumbnail":null,"site":null,"title":null,"priority":1.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403257,"createdAt":"2021-03-02 14:21:30","updatedAt":"2021-03-02 14:21:30","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/6d7abd49eba42924d7413ff4578fcfac.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/6d7abd49eba42924d7413ff4578fcfac.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/6d7abd49eba42924d7413ff4578fcfac.jpg","thumbnail":null,"site":null,"title":null,"priority":2.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403258,"createdAt":"2021-03-02 14:21:31","updatedAt":"2021-03-02 14:21:31","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/78243d44b21ceaae168324dd30e84c17.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/78243d44b21ceaae168324dd30e84c17.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/78243d44b21ceaae168324dd30e84c17.jpg","thumbnail":null,"site":null,"title":null,"priority":3.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403261,"createdAt":"2021-03-02 14:21:32","updatedAt":"2021-03-02 14:21:32","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/70a8fe4ad7e54175d7c78603940687db.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/70a8fe4ad7e54175d7c78603940687db.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/70a8fe4ad7e54175d7c78603940687db.jpg","thumbnail":null,"site":null,"title":null,"priority":4.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403263,"createdAt":"2021-03-02 14:21:33","updatedAt":"2021-03-02 14:21:33","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/625321268bf4ea18ccce4756ba7cc99e.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/625321268bf4ea18ccce4756ba7cc99e.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/625321268bf4ea18ccce4756ba7cc99e.jpg","thumbnail":null,"site":null,"title":null,"priority":5.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403264,"createdAt":"2021-03-02 14:21:33","updatedAt":"2021-03-02 14:21:33","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/696a5d9af46c9b99c997f3d7f48571dc.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/696a5d9af46c9b99c997f3d7f48571dc.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/696a5d9af46c9b99c997f3d7f48571dc.jpg","thumbnail":null,"site":null,"title":null,"priority":6.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403265,"createdAt":"2021-03-02 14:21:34","updatedAt":"2021-03-02 14:21:34","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/0bd918760ef56b35834400a1a3a5e331.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/0bd918760ef56b35834400a1a3a5e331.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/0bd918760ef56b35834400a1a3a5e331.jpg","thumbnail":null,"site":null,"title":null,"priority":7.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403266,"createdAt":"2021-03-02 14:21:34","updatedAt":"2021-03-02 14:21:34","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/30b4fda4dbefad0b8374cee2856f946c.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/30b4fda4dbefad0b8374cee2856f946c.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/30b4fda4dbefad0b8374cee2856f946c.jpg","thumbnail":null,"site":null,"title":null,"priority":8.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403267,"createdAt":"2021-03-02 14:21:34","updatedAt":"2021-03-02 14:21:34","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/9715ff786def2ef3f03d66646e8d1c4d.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/9715ff786def2ef3f03d66646e8d1c4d.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/9715ff786def2ef3f03d66646e8d1c4d.jpg","thumbnail":null,"site":null,"title":null,"priority":9.0,"fileName":null,"file":null,"isDelete":null,"empty":true},{"id":25403269,"createdAt":"2021-03-02 14:21:35","updatedAt":"2021-03-02 14:21:35","productId":1043691,"large":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/7a3bc05406c84099bde36eb097c49e35.jpg","medium":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/7a3bc05406c84099bde36eb097c49e35.jpg","source":"https://resource.donvv.com/1/GoodsPhoto/2020/1/14/7a3bc05406c84099bde36eb097c49e35.jpg","thumbnail":null,"site":null,"title":null,"priority":10.0,"fileName":null,"file":null,"isDelete":null,"empty":true}],"productParameters":[],"productsExt":null,"attributeModel":{"productId":1043691,"aggregationNum":1,"payWayArray":null,"deliveryArray":[],"energyConservation":false,"environmentalProtection":false,"collect":true},"supplier":{"id":30675,"outerId":null,"createdAt":"2020-10-26 14:28:24","updatedAt":"2021-03-16 13:37:15","name":"潍坊惠科瑞智电子科技有限公司","legalName":"","nickName":"潍坊惠科瑞智电子科技有限公司","contactsName":"马昭营","registerDate":null,"companyWebsite":null,"registerAddress":"","isDelete":0,"licenceValidity":null,"licenceName":null,"licenceImg":"106492","bankAccount":"802060501421009527","bankAccountName":null,"openingBank":"潍坊银行股份有限公司高新支行","creditCode":"G1037070501108710G","registeredCapital":null,"legalIdNumber":null,"legalIdCard":null,"legalIdCardValidity":null,"registerZipCode":null,"productionBusinessAddress":"113304","contactsFax":null,"contactsPhone":"0536-8296159","contactsMobile":"13506465936","contactsEmail":"112683410@qq.com","nature":null,"registrationTime":null,"submissionTime":null,"latestReviewTime":null,"storageTime":null,"status":1,"remark":"潍坊惠科瑞智电子科技有限公司（以下简称惠科瑞智）成立于2017年，是一家IT综合性销售及服务公司，公司专业经营：计算机技术的技术服务、技术开发、技术咨询、技术交流、技术转让、技术推广；信息系统集成服务；软件开发；图文设计制作；信息咨询服务（不含许可类信息咨询服务）；会议及展览服务；计算机软硬件及辅助设备零售；通信设备销售；计算机及通信设备租赁；办公设备耗材销售；办公用品销售；文具用品零售；家具销售；家用电器销售；五金产品零售；日用品销售；教学专用仪器销售；电子产品销售（除依法须经批准的项目外，凭营业执照依法自主开展经营活动）许可项目：各类工程建设活动；建设工程设计；第二类增值电信业务（依法须经批准的项目，经相关部门批准后方可开展经营活动，具体经营项目以审批结果为准）。公司本着以客户为中心、秉承尽可能降低成本、互利共赢、完善服务体系为经营理念，以专业化、时尚化、创新化为目标。公司采取一站式服务、免费送货、包退换商品等方式，让您每天的工作更省时、省力。 \n 公司根据每位客户的要求，实行购、配、送一条龙的服务。为每个配送点配置送货车及送货员。收到客户的定单并确认后，市区范围内一般在两小时内送货上门，如需加急，则请客户具体明确加急送货时间，本公司将在能力范围内满足客户的要求，切不收任何加急费用。如果是一些非常用物品,库存没有或不足时，我们则以最快的速度配齐并送至客户手中。 公司还配备一个特殊采购部门，专为客户解决疑难采购用品（国外稀有品牌及非办公用品），或代购物品（不收任何服务费），总之力争最大限度满足客户的需求。 \n    目前，公司在潍坊建立了仓储式配送中心，配备厢式货车、面包车、电动车等各式车辆多部以及与大型快递公司长期签约配送服务，能全面满足客户对IT产品及办公用品、保洁用品快速配送的要求。\n公司全力以“您省心工作，我用心服务！”为服务理念，以“携手瑞智，满意一百”为服务宗旨，以“品质、高效、合作、共赢”为服务准则，满足客户一站式办公采购与服务的需求，实现公司“为客户提供平价、优质、专业、便捷的办公产品与服务”的神圣使命。全体人员在公司 “自强不息、厚德载物”的企业精神指导下，一如既往，努力拼搏，让每一个客户都绽放满意的笑容。","logoUrl":null,"storeLogoId":null,"storeLogo":null,"licenceInfo":null,"productionBusinessAddressInfo":null,"code":"SDGYS30675","priority":null,"nativeName":null,"nativeOpenbank":null,"nativeOpenbankAccount":null,"companyScale":1,"isPrivate":1,"isHightech":0,"certificateUrl":"","certificateName":"","saleState":0,"isKey":null,"catalogContacts":null,"regAreaId":370700,"regAreaName":"潍坊市","regDetailAddress":"奎文区福寿东街6636号3号楼108","examineSite":null,"serviceContent":null,"otherQualification":null,"businessScope":null,"ctOuterId":null,"registed":true,"registedTime":"2020-10-30T16:36:24.000+0800","emallSupplier":1,"mallSupplier":0,"fixSupplier":1,"agentSupplier":1,"entTypeCn":null,"licenseType":null,"licenseRegNo":null,"licenceSn":null,"regOrgCn":null,"apprDate":null,"regCapCur":null,"dom":null,"estDate":null,"opfrom":null,"opto":null,"opscope":null,"users":null,"agreementCode":null,"fixType":null,"bussinessIds":null,"bussinessNames":null,"brand":null,"siteIdSet":null,"protocols":null,"emallProtocol":null,"enterpriseNature":null,"supFileList":null,"quaList":null,"productList":null,"areaIds":null,"articleFile":null,"siteList":null,"catalogContactsList":[],"supplierPayWays":[],"supplierTeamMembers":[],"corporateCertFiles":null,"shopStoreUrl":"http://ggzyjyzx.shandong.gov.cn/wssc/sdszfcg/mall/html/shopIndex.html?s_30675"},"productCars":null,"carParam":null,"carPrice":null,"siteIdSet":[1],"siteId":null,"system":null,"offShelf":false,"invalid":false,"protocolInvalid":false,"labels":null,"isForeignTradeAgency":false,"agencyType":null,"foreignTradeSupplierKey":null,"foreignTradeSupplierName":null,"emallUrl":null,"url":"http://ggzyjyzx.shandong.gov.cn/wssc/sdszfcg/mall/html/product.html?c_145|p_1043691","carUrl":"http://ggzyjyzx.shandong.gov.cn/wssc/sdszfcg/mall/html/car/products.html?c_145|p_1043691","poolSupportUrl":"http://ggzyjyzx.shandong.gov.cn/wssc/sdszfcg/mall/html/poverty-relief/poverty-detail.html?c_145|p_1043691|proto_null","ctlUrl":"http://ggzyjyzx.shandong.gov.cn/wssc/sdszfcg/central/html/product.html?c_145|p_1043691","allowPurchase":true,"reduceAmount":0.02000,"emall":true,"productAreaTypeLabel":""}

            string strGoodsDetailHtml = QLYCCatch.GetHtml("http://ggzyjyzx.shandong.gov.cn/wssc/sdszfcg/mall/html/product.html?c_145|p_1043691");

            Response.Clear();
            Response.Write(strGoodsDetailHtml);
            Response.End();



























            //string r = HttpManager.HttpSendAsync(
            //        HttpMethod.Get,
            //        "https://dyn.ithome.com/js/login",
            //        null,
            //        null);
            //Response.Write(r);


            //Task<IScheduler> sch = QuartzHelper.GetScheduler();
            //IScheduler isch = sch.Result;
            //Task<IReadOnlyCollection<string>> _groups = isch.GetJobGroupNames();
            //IReadOnlyCollection<string> groups = _groups.Result;

            //foreach (string groupName in groups)
            //{

            //    Task<IReadOnlyCollection<JobKey>> _jobKeys = isch.GetJobKeys(GroupMatcher<JobKey>.GroupEquals(groupName));

            //    foreach (JobKey jobKey in _jobKeys.Result)
            //    {
            //        string jobName = jobKey.Name;
            //        string jobGroup = jobKey.Group;
            //        Task<IReadOnlyCollection<ITrigger>> _triggers = isch.GetTriggersOfJob(jobKey);
            //        ITrigger trigger = _triggers.Result.ToList()[0];
            //        DateTimeOffset? dto = trigger.GetNextFireTimeUtc();
            //        DateTime dt = Convert.ToDateTime(dto.ToString());
            //        DateTime nextJobTime = TimeZone.CurrentTimeZone.ToLocalTime(dt);

            //    }
            //}


        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            string to = "client_" + "thintenwork_cabd75d1b524ef380ef3b01339d6ff9a";
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "drivers",
                    Data = ""
                })
            );
        }
        protected void Button3_Click(object sender, EventArgs e)
        {
            string to = "client_" + "thintenwork_cabd75d1b524ef380ef3b01339d6ff9a";
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "files",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        Path = "C:\\"
                    })
                })
            );
        }
        protected void Button4_Click(object sender, EventArgs e)
        {
            string to = "client_"+ "thintenwork_cabd75d1b524ef380ef3b01339d6ff9a";
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "screen_capture",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        Path = "C:/bytesite_temp/"
                    })
                })
            );
        }

        protected void Button5_Click(object sender, EventArgs e)
        {
            string to = "client_" + "thintenwork_cabd75d1b524ef380ef3b01339d6ff9a";
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "download",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        Url = "http://shop.zhenmeizhixiu.com/kdocs.zip",
                        Path = "C:/bytesite_temp/",
                        Unzip = 1,
                    })
                })
            );
        }
        protected void Button6_Click(object sender, EventArgs e)
        {
            string to = "client_" + "thintenwork_cabd75d1b524ef380ef3b01339d6ff9a";
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "cmd",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        Command = "ipconfig /all",
                        Seconds=15
                    })
                })
            );
        }
        protected void Button7_Click(object sender, EventArgs e)
        {
            string to = "client_" + "thintenwork_cabd75d1b524ef380ef3b01339d6ff9a";
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "exe",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        FileName = "C:/bytesite_temp/KDocs_1005_v2.10.0.exe",
                        Paras="",
                        NoWindow=0,
                    })
                })
            );
        }
        protected void Button8_Click(object sender, EventArgs e)
        {
            string to = "client_" + "thintenwork_cabd75d1b524ef380ef3b01339d6ff9a";
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "mouse",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        X = 707,
                        Y = 721,
                        Action = "move",
                    })
                })
            );
            Thread.Sleep(500);
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "mouse",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        X = 707,
                        Y = 721,
                        Action = "left_click",
                    })
                })
            );
            Thread.Sleep(500);
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "mouse",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        X = 954,
                        Y = 654,
                        Action = "move",
                    })
                })
            );
            Thread.Sleep(500);

            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "mouse",
                    Data = JsonHelper2.ObjectToJSON(new
                    {
                        X = 954,
                        Y = 654,
                        Action = "left_click",
                    })
                })
            );

        }

        protected void Button9_Click(object sender, EventArgs e)
        {
            string to = "client_" + "honor-gonziy_054df48ae065cf7c78153208503ae1ce";
            WebSocketManager.SendMsgToRemotePoint(
                to,
                JsonHelper2.ObjectToJSON(new WebSocketMessage()
                {
                    Guid = Guid.NewGuid().ToString(),
                    From = "server",
                    To = to,
                    Time = DateTime.Now,
                    Channel = "server",
                    MessageType = "remote_sys",
                    Message = "remote_desktop",
                    Data = ""
                })
            );
        }
    }
}